<?php
class User_Model extends Model {

        public $_id,$nazwisko,$imie,$email;
        /*
         * zmienia status produktu na usuniety
         * @param $tablica_indeksow - tablica id_produktow
         */
        public function set_id($id)
        {
            $this->_id=$id;
        }
        public function get_id()
        {
            return $this->_id;
        }
        public function sprawdz($haslo)
        {
            $s=$this->db->query('select * from user where haslo like ?',$haslo)->result_array(false);
            return $s;
        }
        public function calosc()
        {
            $s=$this->db->query('select * from user ')->result_array(false);
            return $s;
        }
        public function spr($haslo)
        {
            $s=$this->db->query('select * from user where haslo like ?',$haslo)->result_array(false);
            return $s;
        }

        public function set_nazwisko($zmienna)
        {
            $this->nazwisko=$zmienna;
        }
        public function get_nazwisko()
        {
            return $this->nazwisko;
        }
        public function set_imie($zmienna)
        {
            $this->imie=$zmienna;
        }
        public function get_imie()
        {
            return $this->imie;
        }
        protected function pobierz_calego_usera()
        {
            $sql="select nazwisko,imie,email,id_users as id_osoby from users where id_users=?";
            $rezultat=$this->db->query($sql,array(
                $this->_id))->result_array(false);
        }
        public function __construct(){
            parent::__construct();
        }
        public function pobierz_wszystkich_nieprzypisanych()
        {
            
        }

}
?>
